<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>事件绑定2</title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			展示数据:{{msg}}
			<button @click="add()">自增函数</button>
			
		</div>
		<script>
		const app = new Vue({
			el:"#app",
			data:{
				msg:20
			},
			methods:{
				add:function(){
					this.msg++;
				}
			}
		})
		</script>
	</body>
</html>
